'use strict';

var sequelize=require('./_db').sequelize();
var MLUsers = sequelize.import('./MLUsers');
var MLGrouping = sequelize.import('./MLGrouping');
var MLFriends = sequelize.import('./MLFriends');
var MLAddFriend = sequelize.import('./MLAddFriend');

// 建立模型之间的关系
//建立外键
// MLUsers.hasMany(MLAddFriend, {foreignKey:'addUserId', targetKey:'id', as:'addUser'});

// 同步模型到数据库中
sequelize.sync();

exports.MLUsers = MLUsers;
exports.MLGrouping = MLGrouping;
exports.MLAddFriend = MLAddFriend;
exports.MLFriends = MLFriends;